import { ApiProperty } from '@nestjs/swagger';

export class UserActionLogDto {
  @ApiProperty({
    description: '操作类型',
    example: 'use',
  })
  action: 'use' | 'save';

  @ApiProperty({
    description: '数据类型',
    example: 'Template',
  })
  type: 'Template' | 'Kit' | 'Component';

  @ApiProperty({
    description: 'Component 时候的组件名',
    example: 'Template',
    required: false,
  })
  componentName: string;

  @ApiProperty({
    description: 'Component 时候的组件props',
    example: '',
    required: false,
  })
  content: string;

  @ApiProperty({
    description: 'Template, Kit 通过id关联出来的name',
    example: 'Template',
    required: false,
  })
  name: string;

  @ApiProperty({
    description: 'Template, Kit 通过id关联出来的name',
    example: 'Template',
    required: false,
  })
  description: string;

  @ApiProperty({
    description: '使用次数',
    required: false,
  })
  useCount: number;
}
